import Vue from 'vue'
import App from './App'
import Store from './store'
import Util from './static/js/core/util.js'
import uView from "uview-ui";
import cos from './common/cos.js'
// import Bus from './common/bus.js'

Vue.use(uView);

Vue.config.productionTip = false

// 挂载vuex
Vue.prototype.$store = Store;
// 上传图片的URL地址
Vue.prototype.$uploadURL = 'https://h-178.com/salesman/service/oss/uploadFile';
// 工具包
Vue.prototype.$util = Util;
//腾讯cos
Vue.prototype.cos = cos;

App.mpType = 'app'

const app = new Vue({
    ...App
})

// http拦截器，此为需要加入的内容，如果不是写在common目录，请自行修改引入路径
import httpInterceptor from '@/common/http.interceptor.js'
// 这里需要写在最后，是为了等Vue创建对象完成，引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)

// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)

import * as filters from './common/filter.js';
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key])
})

app.$mount()
